class WebsitesinfoController < ApplicationController
before_filter :authorize
    layout "websitesinfo"
    
      active_scaffold :websitesinf do |config|
  config.label = "Websites Information"
  config.action_links.add 'export_csv', :label => 'Export to Excel', :page => true
  config.action_links.add 'trunc_tbl', :label => 'Clear DataBase', :page => true
  	  config.columns = [:name1,:description1,:url1,:editorname1,:seditorname1,:mission1,:ecweekly1]	
		 config.columns[:name1].label ="Website Name"
		 config.columns[:description1].label ="Website Description"
		 config.columns[:url1].label ="Website URL"
		 config.columns[:editorname1].label ="Name of Editor"	  	 
		 config.columns[:seditorname1].label ="Name of Sub Editor"
		 config.columns[:mission1].label ="Website mission"	  	 
		 config.columns[:ecweekly1].label ="Editors weekly comment"	
		    config.nested.add_link("Websites's tasks", [:tasksdescs]) 
   		 config.columns[:tasksdescs].search_sql = "CONCAT(tasksdescs.taskdes1,tasksdescs.ecomments1)"    
		 config.search.columns << :tasksdescs
		 

#   		 config.columns[:subtasksdescs].search_sql = "CONCAT(subtasksdescs.descocont1,subtasksdescs.commocont1,subtasksdescs.conturl1,subtasksdescs.searterm1,subtasksdescs.uname1,subtasksdescs.upwd1)"    
#		 config.search.columns << :subtasksdescs
		 
  end

end
